<script language="javascript" type="text/javascript">	
	$('.modifica').click(function() {
	   var var_name = $("#res:checked").val();
	   var jrole = "libri/librimod.php?mod="+var_name;
        $('#ricercalibro').fadeOut(1000,function(){$('#ricercalibro').load(jrole,'',$('#ricercalibro').fadeIn(1000))}); 
		return false;
    }); 
	
    </script>

<?php
require("../Connections/mlu.php");
	if (isset($_GET['codice']))
		$where=" where codiceEAN like '".$_GET['codice']."%'";
	if (isset($_GET['titolo']))
		$where=" where titolo like '%".$_GET['titolo']."%'";
	  $insertSQL = "select * from libri left join materie using (idmateria)".$where;
      $Result1 = mysql_query($insertSQL, $mlu) or die(mysql_error());
	  
	$insertSQL = "select * from materie";
    $Resultmaterie1 = mysql_query($insertSQL, $mlu) or die(mysql_error());	  
 ?>
 
  <table border="1" align="center" class="tabellalibri">
    <tr>
    <td>&nbsp;</td>
      <td>EAN</td>
      <td>titolo</td>
      <td>casa editrice</td>
      <td>prezzo</td>
      <td> materia</td>
    </tr>
    <?php while ($row_Recordset1riclibri = mysql_fetch_assoc($Result1))
	{  ?>
    <tr>
        <td><input type="radio" id="res" value="<?php echo $row_Recordset1riclibri['codiceEAN']; ?>" name="Radio1"/></td>  
      <td><?php echo $row_Recordset1riclibri['codiceEAN']; ?></td>
      <td><?php echo $row_Recordset1riclibri['titolo']; ?></td>
      <td><?php echo $row_Recordset1riclibri['home']; ?></td>
      <td><?php echo $row_Recordset1riclibri['prezzo']; ?></td>
      <td><?php echo $row_Recordset1riclibri['nomemateria']; ?></td>
    </tr>
    <?php 
	} ?>
</table>
<button class="modifica">Modifica</button>